Skip to content

fix datagrid column resize on rtl mode#4436

Closed
ehsangfl wants to merge 2 commits intomicrosoft:devfrom
ehsangfl:dev
Closed

fix datagrid column resize on rtl mode#4436
ehsangfl wants to merge 2 commits intomicrosoft:devfrom
ehsangfl:dev

Conversation

@ehsangfl
Copy link
Copy Markdown
Contributor

@ehsangfl ehsangfl commented Jan 3, 2026

Pull Request

📖 Description

on RTL mode, the resize-handle div should display at the end of column (left)
Additionally, when the user starts to drag the actual-resize-handle element,
Increasing or decreasing the column width should be the opposite of left-to-right.

🎫 Issues

resize-handle rendered at the start of column
drag does not behave as expected

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

Copy link
Copy Markdown
Collaborator

@vnbaaij vnbaaij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good fix in it's current form.

The only thing that is needed to make RTL resizing work correctly is that in the script on lines 301 and 305 the 'px' need to be removed (so it just says div.style.left='0' and div.style.right='0').

There are no CSS changes needed and the calculation on line 259 is already correct. Your change would lead to the same result for the diffX value

@vnbaaij
Copy link
Copy Markdown
Collaborator

vnbaaij commented Jan 9, 2026

Fixed with #4453

@vnbaaij vnbaaij closed this Jan 9, 2026
@ehsangfl
Copy link
Copy Markdown
Contributor Author

ehsangfl commented Jan 24, 2026

Hi @vnbaaij
Sorry for the delay
I'm from Iran, and as you may have heard from the news, the government shut down the internet for more than two weeks
Anyway
I think this is a better way to keep styles in one place
If you set "right:0" in the CSS (Line 70), you should support rtl on there, and if you want to set styles on javascript file, it is better to remove "right:0" from the CSS file
In line 259, I just made it more readable, and nothing changed

Thanks for your response

@vnbaaij
Copy link
Copy Markdown
Collaborator

vnbaaij commented Jan 24, 2026

Hope you and your loved ones are safe and well!

I verified the working with the other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants